package com.wizz.trade.auth.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wizz.trade.auth.entity.SysRoleGroup;
import com.wizz.trade.auth.mapper.SysRoleGroupMapper;
import com.wizz.trade.auth.service.SysRoleGroupService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author fyftless
 */
@Service
public class SysRoleGroupServiceImpl extends ServiceImpl<SysRoleGroupMapper, SysRoleGroup> implements SysRoleGroupService {

    @Resource
    private SysRoleGroupMapper sysRoleGroupMapper;

    @Override
    public void insert(SysRoleGroup sysRoleGroup) {
        sysRoleGroupMapper.insert(sysRoleGroup);
    }

    @Override
    public void delete(Long id) {
        sysRoleGroupMapper.deleteById(id);
    }

    @Override
    public void update(SysRoleGroup sysRoleGroup) {
        sysRoleGroupMapper.updateById(sysRoleGroup);
    }

    @Override
    public List<SysRoleGroup> getAll() {
        return sysRoleGroupMapper.selectList(null);
    }
}
